{%extends "base.html"%}
{%block title%}详细活动信息{%endblock%}
{%block sideleft%}{%include "sideleft.html"%}{%endblock%}
{%block content%}
<!--登录成功以后的内容-->
<div class='activity_detail'>
	<h1>{{activityInfo.activityname}}</h1>
</div>
<div class='friends'>
    <h3>参加这个活动的成员</h3>
	<ul id="portfolio">
		<div class='members'>
			{%for member in members%}
				<li  class='activity_friends'>			
					<a href="/activitys/people/{{member.member_id}}"><image src="{{member.profile_image}}" alt="{{member.name}}"></image></a>
					{{member.name}}				
				</li>
			{%endfor%}
		</div>

		<div class='acti_info'>
		    <h4>创建时间:{{activityInfo.datetime|date:"Y-m-d H:m:s D" }}</h4>
		    <h4>创建人:{{activityInfo.username}}</h4>
			<h4>地点:{{activityInfo.address}}</h4>
			<h4>时间:
			{%ifequal activityInfo.date|date:"Y-m-d" "2008-03-08"%}
					随便哪一天</h4>
			{%else%}
					{{activityInfo.date|date:"Y-m-d"}}</h4>
			{%endifequal%}
			
			
		</div>
		<div class='goornot'>
		{%ifnotequal activityInfo.username request.session.userinfo.username%}
				{%if joined%}
					<span><a href="/activity/{{activityInfo.id}}/do_cancel">我不去了</a></span>
				{%else%}
					<span><a id='go' href="/activity/{{activityInfo.id}}/do">我也去</a></span>				
				{%endif%}
		{%endifnotequal%}
		</div>	
	</ul>
</div>

<div class='suggestion'>
    <h3>大伙对活动的建议</h3>
    <ul>
        {{suggestionform.as_ul}}
        <li style='margin-top:10px;'><input type="submit" value="给个建议" class='submit' onclick="addSugg()"/><p class='js_id' style="display:none">{{activityInfo.id}}</p> </li>       
    </ul>   	

	<ul id="portfolio">
	{%for suggestion in pages.object_list%}
		<li class='sugg'>
			<a href='/activitys/people/{{suggestion.author_id}}'>{{suggestion.suggestion_author}}</a>:
			{{suggestion.suggestContext}}({{suggestion.datetime|date:"Y-m-d H:m:s"}})
			{%ifequal suggestion.suggestion_author request.session.userinfo.username%}
				<a href='javascript:delsugg({{suggestion.id}})' class='delete'>删除</a>
			{%endifequal%}
		</li> 	
	{%endfor%}
	</ul>
	<div class="fenye">
	{%if pages.has_other_pages%}
		{%if pages.has_previous%}
			<a href="?page={{pages.previous_page_number}}">上一页</a>
		{%endif%}
		{%for p in page_range%}
			{%ifequal p pages.number%}
				<span>{{p}}</span>
			{%else%}
				<a href="?page={{p}}">{{p}}</a>
			{%endifequal%}
		{%endfor%}
		{%if pages.has_next%}
			<a href="?page={{pages.next_page_number}}">下一页</a>
		{%endif%}
	{%endif%}
	</div>
	
</div> 

<div class='shop'>
    <h3>相关推荐</h3>
	<ul id="portfolio">
	{%for member in members%}
		<li class='invitefriends'>
			<image src="{{member.profile_image}}" alt="{{member.name}}"></image>
			<span>{{member.name}}</span>
		</li>
	{%endfor%}
	</ul>
</div>

{%endblock%}
{%block sideright%}{%include "sideright.html"%}{%endblock%}
